import request from '@/plugin/axios'
import { sysPath } from '@api/sys.common'

// 进销存采购

export function getOrderPage(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/page',
        method: 'post',
        params
    })
}

export function getOrderInfo(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/info',
        method: 'post',
        params
    })
}

export function listOrderDetail(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/detail/list',
        method: 'post',
        params
    })
}

export function getOrderDetailPage(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/detail/page',
        method: 'post',
        params
    })
}

export function submitOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/submit',
        method: 'post',
        params
    })
}

export function delOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/del',
        method: 'post',
        params
    })
}

export function auditOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/audit',
        method: 'post',
        params
    })
}

export function cancelOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/cancel',
        method: 'post',
        params
    })
}

export function saveOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/save',
        method: 'post',
        data: params
    })
}


export function pageToStockInOrder(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/tostockin/page',
        method: 'post',
        params
    })
}

export function listToStockInOrderDetail(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/detail/tostockin/list',
        method: 'post',
        params
    })
}

export function exportPurchaseDetail(params){ 
    return request({
        url: sysPath + '/hx-mart/api/v1/purchase/order/detail/export',
        method: 'post',
        responseType: 'blob',
        data:params
    })
}







